blob: 613e2b3d5fb8620b692d3433aae23f12232378cf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
---
export async function getStaticPaths() {
// get english pages that moved from `/` to `/en/`
const englishPages = Astro.fetchContent('./en/**/*.md');
// add pages that are `*.astro` files as well
const otherPages = [{ url: "/en/themes" }];
return [...englishPages, ...otherPages].map((page) => ({
params: {
slug: page.url.slice(4),
},
props: {
englishSlug: page.url,
}
}));
}
---
<meta http-equiv="refresh" content={`0;url=${Astro.props.englishSlug}`} />
|